home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-02-16 | 1.9 KB | 45 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 3649324 14-Feb-90 08:29PST
-
- From: D4280 IDS, Robert Pappas,AST
-
- To: MACAPP.TECH$ MacApp Technical
- JAIME1 Cummins, Jaime
-
- Sub: Data Dilemma
-
-
-
- MacAppers -
-
- Background: I am creating a document editor that contains the ability to insert
- and edit text blocks, insert and edit mini-spreadsheets, and also insert
- dynamic graphs that reflect the spreadsheet data. Associated with each view of
- these objects is some data. For instance, the text contains tags that the user
- never sees, he sees a string that represents some data value; the Draw method
- of the text block expands the tag to real text. So we have "shadow data", data
- that is used to create and draw the view.
-
- Dilemma: Where do I put the data? It seems that from most of the MacApp demo's,
- the views do not contain the data. The TDocument contains objects that are the
- data. Those data objects do not draw themselves. A seperate view object that
- knows where to get the data does the drawing. So a separate data reference
- chain is needed to manage the data. The data reference chain and the view chain
- need to reference each other also. Also, the data and the views must be saved
- to disk when the document is. So you have 2 parts of the document: Content info
- (data) and Layout info (Views).
-
- I am leaning toward having views manage data. A view that manages data has a
- sub-view that knows how to draw it. That way I can take advantage of the
- sub-view/super-view reference chain for binding the data and the views. Also
- some other things are slick like DoRead and DoWrites. This makes me nervous
- because I haven't seen anybody else do it this way. Hence views manage the
- Content as well as the Layout.
-
- I would appreciate any comments!!!
-
- Thanks, Bob Pappas
- IDS Financial Services
-
-